package com.jhg.drgclinicalpathway.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class RpnMsg {
    private Integer code;
    private String msg;
    private Object data;

    public static RpnMsg SUCCESS(){
        return new RpnMsg(0,"操作成功",null);
    }
    public static RpnMsg FAIL(String msg){
        return new RpnMsg(1,msg,null);
    }
    public static RpnMsg SUCCESS(Object data){
        RpnMsg success = RpnMsg.SUCCESS();
        success.setData(data);
        return success;
    }
}
